<!-- Start of first page -->
<div data-role="page" id="dashboard">
      <div data-theme="a" data-role="header">
           <h3>DashBoard</h3>
           <a href="<?php echo Yii::app()->createUrl('site/logout');?>" data-role="button" data-icon="gear">Exit</a>
           <a href="#userid" data-rel="popup" data-role="button" data-icon="info" data-iconpos="notext">Name</a>
           <div id="userid" data-role="popup">
              <h3><?php echo Yii::app()->user->name ?></h3>
           </div>
       </div>
            <!-- Preview will open a new browser tab or window
            jQuery mobile not loading new page scripts, use rel="external"
            http://stackoverflow.com/questions/9418309/jquery-mobile-not-loading-new-page-scripts
            http://forum.jquery.com/topic/script-not-running-unless-i-refresh-page
            -->
      <div data-role="content" data-theme="a" id="menu">
           <a href="<?php echo Yii::app()->createUrl('offer/update');?>" data-role="button" data-icon="gear" data-iconpos="bottom">Edit Offers</a>
           <a href="<?php echo Yii::app()->createUrl('business/update');?>" data-role="button" data-icon="gear" data-iconpos="bottom">Edit Business</a>
           <a href="<?php echo Yii::app()->createUrl('subscription/update');?>" data-role="button" data-icon="gear" data-iconpos="bottom">Manage Account</a>
           <a href="<?php echo Yii::app()->createUrl('site/offers');?>" data-role="button" data-icon="gear" data-iconpos="bottom">View Stats</a>
           <a href="<?php echo Yii::app()->createUrl('business/client');?>" data-role="button" data-icon="gear" data-iconpos="bottom" target="_blank">Preview</a>
      </div>

      <?php $this->renderPartial("//site/footer")?>
      <!-- /footer -->
 </div>
<!-- / main page -->

<!--
<script type='text/javascript'>
    $(window).load(function(){
        $("#home").swiperight(function() {
            $.mobile.changePage("#page2");
        });
        $("#home").swipeleft(function() {
            $.mobile.changePage("#page3");
        });

    });

    <script type='text/javascript'>
    $("#dashboard").bind("swiperight", function(){
        $.mobile.changePage("#page2");
    });
    $("#dashboard").bind("swipeleft", function(){
        $.mobile.changePage("#page3");
    });
</script>
,array('id'=>Yii::app()->user->id)


<div data-role="page" id="page2">
    <div data-role="content">

        <ul data-role="listview" data-inset="true" data-theme="b">
            <li data-role="list-divider">Navigation</li>
            <li><a href="#home">Back to the Home Page</a></li>
        </ul>

        <p>
            Yeah!<br />You Swiped Right to view Page 1
        </p>
    </div>
</div>

<div data-role="page" id="page3">
    <div data-role="content">

        <ul data-role="listview" data-inset="true" data-theme="c">
            <li data-role="list-divider">Navigation</li>
            <li><a href="#home">Back to the Home Page</a></li>
        </ul>

        <p>
            Yeah!<br />You Swiped Left to view Page 1
        </p>
    </div>
</div>
-->





